package com.purchase.ml.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.purchase.ml.entity.sys.SysPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    * 菜单权限表 Mapper 接口
    * </p>
*
* @author kyyang
* Created 2021-01-20
*/
@Mapper
@Repository
public interface SysPermissionMapper extends BaseMapper<SysPermission> {


    @Select("select id, parentId, name,enname, component, href, type, permission, sort, enabled from sys_permission where parentId = #{permissionId}")
    List<SysPermission> selectByParentId(@Param("permissionId") Integer permissionId);
}
